/**
 * Created by minigci.he on 16/9/9.
 */
console.log('----------------------')
console.log('test9')

var size = Symbol('size');
class Collection{
    constructor(){
        this[size] = 0;
    }
    add(item){
        this[this[size]] = item;
        this[size]++;
    }
    static  sizeOf(instance){
        return instance[size]
    }
}

var x = new Collection();
console.log(Collection.sizeOf(x));

x.add('foo');
console.log(Collection.sizeOf(x));


console.log(x);
console.log(Object.keys(x));
console.log(Object.getOwnPropertyNames(x));
console.log(Object.getOwnPropertySymbols(x));

